package com.hsj.singleribbondemo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyController {

    @Autowired
    private Environment env;

    @GetMapping("/test")
    public String test(){
        String port = env.getProperty("server.port");
        return port+"-ok";
    }



}
